package Test6;

public class Circle extends Figure{
    private double R;

    public Circle() {
    }
    public Circle(double r) {
        R = r;
    }

    public double getR() {
        return R;
    }
    public void setR(double r) {
        R = r;
    }

    @Override
    public void perimeter() {
        System.out.println("圆的周长为:"+3.14*2*this.getR());
    }

    @Override
    public void area() {
        System.out.println("圆的面积为:"+3.14*this.getR()*this.getR());
    }
}
